﻿@{
    ViewBag.Title = "角色管理";
    Layout = "~/Views/Shared/_BootstrapUI.cshtml";
}
<link href="~/Content/bootstrap-treeview-master/dist/bootstrap-treeview.min.css" rel="stylesheet" />
<style type="text/css">
    .tree {
        -moz-user-select: none;
        -ms-user-select: none;
        -webkit-user-select: none;
        user-select: none;
        /*min-height: 20px;
            padding: 19px;
            margin-bottom: 20px;
            background-color: #fbfbfb;
            border: 1px solid #999;
            -webkit-border-radius: 4px;
            -moz-border-radius: 4px;
            border-radius: 4px;
            -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
            -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
            box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);*/
    }

        .tree li {
            list-style-type: none;
            margin: 0;
            padding: 10px 5px 0 5px;
            position: relative;
        }

            .tree li::before, .tree li::after {
                content: '';
                left: -20px;
                position: absolute;
                right: auto;
            }

            .tree li::before {
                border-left: 1px solid #999;
                bottom: 50px;
                height: 100%;
                top: 0;
                width: 1px;
            }

            .tree li::after {
                border-top: 1px solid #999;
                height: 20px;
                top: 25px;
                width: 25px;
            }

            .tree li span {
                -moz-border-radius: 5px;
                -webkit-border-radius: 5px;
                border: 1px solid #999;
                border-radius: 5px;
                display: inline-block;
                padding: 3px 8px;
                text-decoration: none;
            }
            /*.tree li.parent_li > span { cursor: pointer; }*/
            .tree li > span {
                cursor: pointer;
            }

        .tree > ul > li::before, .tree > ul > li::after {
            border: 0;
        }

        .tree li:last-child::before {
            height: 30px;
        }

        .tree li.parent_li > span:hover, .tree li.parent_li > span:hover + ul li span {
            background: #eee;
            border: 1px solid #94a0b4;
            color: #000;
        }
    .tc_color {
        background:#d9cfcf;
    }
</style>
<div class="content-wrapper">
    <div class="row">
        <div class="col-md-3">
            <!-- START panel-->
            <div class="panel panel-default">
                <div class="panel-heading">
                    <div class="pull-right">
                        <a href="#" id="Btn_Add" class="btn btn-xs btn-primary">增加</a>
                        <a href="#" id="Btn_Edit" class="btn btn-xs btn-primary">修改</a>
                        <a href="#" id="Btn_Delete" class="btn btn-xs btn-primary">删除</a>
                    </div>
                    <div class="panel-title">角色管理</div>
                </div>
                <div class="panel-body bt">
                    <div class="tree" id="role_tree">
                        <ul>
                            <li>
                                <input id="tree_id" type="hidden" />
                                <span id="-1"><i class="icon-people"></i> 系统角色</span>
                                @{
                                    var dt = new FZKJ.BLL.sys_roleinfo().GetList("isenable='1' order by rolesort asc").Tables[0];
                                    for (int i = 0; i < dt.Rows.Count; i++)
                                    {
                                        <ul>
                                            <li>
                                                <span id="T_@(dt.Rows[i]["rolecode"].ToString())" title="@dt.Rows[i]["rolename"].ToString()">@dt.Rows[i]["rolename"].ToString()</span>
                                            </li>
                                        </ul>
                                    }
                                }
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
            <!-- END panel-->
        </div>
        <div class="col-md-9">
            <!-- START panel-->
            <div class="panel panel-default">
                <div class="panel-heading">
                    <div class="pull-right">
                        <a href="#" id="Btn_Save" class="btn btn-xs btn-primary">保存</a>
                        <input type="hidden" id="mpcode" />
                    </div>
                    <div class="panel-title">权限设置</div>
                </div>
                <div class="panel-body bt">
                    <div class="tree" id="power_tree">
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<div id="roleAddModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabelLarge" aria-hidden="true" class="modal fade">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" data-dismiss="modal" aria-label="Close" class="close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 id="title" class="modal-title">角色新增</h4>
            </div>
            <div class="modal-body">
                <form role="form" class="form-horizontal" data-parsley-validate="" novalidate="">
                    <div class="form-group">
                        <label class="col-md-2 control-label">角色名称</label>
                        <div class="col-md-10">
                            <input id="id" type="hidden" value="-1" />
                            <input id="rolename" type="text" placeholder="角色名称" class="form-control" required="required" data-parsley-error-message="请输入角色名称..." />
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-2 control-label">角色排序</label>
                        <div class="col-md-10">
                            <input id="rolesort" type="number" placeholder="角色排序" class="form-control" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-2 control-label">备注</label>
                        <div class="col-md-10">
                            <textarea id="remark" maxlength="200" placeholder="备注" class="form-control"></textarea>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" data-dismiss="modal" class="btn btn-default">关闭</button>
                <button id="btnSave" type="button" class="btn btn-primary">保存</button>
            </div>
        </div>
    </div>
</div>


<script src="~/Content/bootstrap-treeview-master/dist/bootstrap-treeview.min.js"></script>
<script src="~/Pscripts/System/RoleManage.js?v=1"></script>
